import { getLevelFirst, getLevelZero } from '@/utils';

/**
 * 委托管理
 * @param curRes
 * @returns
 */
const getManageTabSwitch = (curRes: Record<string, any>) => {
  if (curRes?.['/delegateController/createCompanyID']) {
    return {
      createCompanyID: getLevelZero(),
      params: 'createCompanyID',
    };
  } else if (curRes?.['/delegateController/createDepartmentID']) {
    return {
      createDepartmentID: getLevelFirst(),
      params: 'createDepartmentID',
    };
  }
  return {};
};

export { getManageTabSwitch };
